﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
						  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
						  xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
						  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
						  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
						  mc:Ignorable="d">
	<!-- Resource dictionary entries should be defined here. -->
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/Informant.Clients.UI.Wpf4;component/Resources/Colors.xaml" />
		<ResourceDictionary Source="/Informant.Clients.UI.Wpf4;component/Resources/Brushes.xaml" />
	</ResourceDictionary.MergedDictionaries>
	<Style x:Key="INFBaseStyle">
		<Setter Property="TextBlock.Foreground"
				  Value="{StaticResource INFForegroundColor}" />
		<Setter Property="TextBlock.FontFamily"
				  Value="Segoe UI" />
		<Setter Property="TextBlock.FontSize"
				  Value="16" />
		<Setter Property="TextBlock.FontWeight"
				  Value="Normal" />
	</Style>
	<Style x:Key="ButtonFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Stroke="#40FFFFFF"
								  StrokeDashArray="1 2"
								  StrokeThickness="1"
								  Margin="2"
								  SnapsToDevicePixels="true" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style BasedOn="{StaticResource INFBaseStyle}"
			 TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle"
				  Value="{StaticResource ButtonFocusVisual}" />
		<Setter Property="Background"
				  Value="{StaticResource ButtonNormalBackground}" />
		<Setter Property="BorderBrush"
				  Value="{StaticResource ButtonNormalBorder}" />
		<Setter Property="Foreground"
				  Value="{StaticResource ButtonNormalForeground}" />
		<Setter Property="HorizontalContentAlignment"
				  Value="Center" />
		<Setter Property="VerticalContentAlignment"
				  Value="Center" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="MouseEnter">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
																	 Storyboard.TargetName="ButtonHover"
																	 Storyboard.TargetProperty="(UIElement.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
															 Value="1" />
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="MouseLeave">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
																	 Storyboard.TargetName="ButtonHover"
																	 Storyboard.TargetProperty="(UIElement.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
															 Value="0" />
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid x:Name="LayoutRoot">
						<Border x:Name="border"
								  Margin="0"
								  Background="{TemplateBinding Background}"
								  BorderBrush="{TemplateBinding BorderBrush}"
								  CornerRadius="5">
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
													RecognizesAccessKey="True"
													HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
													VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
						</Border>
						<Border x:Name="ButtonHover"
								  BorderBrush="Black"
								  BorderThickness="1"
								  Opacity="0">
							<Border.Background>
								<LinearGradientBrush EndPoint="0.5,1"
															StartPoint="0.5,0">
									<GradientStop Color="#7FFFFFFF"
													  Offset="0" />
									<GradientStop Offset="1" />
								</LinearGradientBrush>
							</Border.Background>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Mouse.MouseEnter"
										  SourceName="LayoutRoot">
							<BeginStoryboard Storyboard="{StaticResource MouseEnter}" />
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseLeave"
										  SourceName="LayoutRoot">
							<BeginStoryboard x:Name="MouseLeave_BeginStoryboard"
												  Storyboard="{StaticResource MouseLeave}" />
						</EventTrigger>
						<Trigger Property="IsEnabled"
									Value="false">
							<Setter Property="Foreground"
									  Value="#ADADAD" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style BasedOn="{StaticResource INFBaseStyle}"
			 TargetType="{x:Type PasswordBox}">
		<Setter Property="BorderBrush"
				  Value="#BF000000" />
		<Setter Property="Background"
				  Value="#99000000" />
		<Setter Property="BorderThickness"
				  Value="2" />
		<Setter Property="Padding"
				  Value="2" />
		<Setter Property="PasswordChar"
				  Value="●" />
		<Setter Property="HorizontalContentAlignment"
				  Value="Left" />
		<Setter Property="FocusVisualStyle"
				  Value="{x:Null}" />
		<Setter Property="AllowDrop"
				  Value="true" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type PasswordBox}">
					<Border x:Name="Bd"
							  SnapsToDevicePixels="true"
							  Background="{TemplateBinding Background}"
							  BorderThickness="{TemplateBinding BorderThickness}"
							  BorderBrush="{TemplateBinding BorderBrush}">
						<ScrollViewer x:Name="PART_ContentHost"
										  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled"
									Value="false">
							<Setter Property="Background"
									  TargetName="Bd"
									  Value="{StaticResource ResourceKey=INFBackgroundDisabledGradient}" />
							<Setter Property="Foreground"
									  Value="{StaticResource ResourceKey=INFForegroundDisabledColor}" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style BasedOn="{StaticResource INFBaseStyle}"
			 TargetType="{x:Type TextBox}">
		<Setter Property="BorderBrush"
				  Value="#BF000000" />
		<Setter Property="Background"
				  Value="#99000000" />
		<Setter Property="BorderThickness"
				  Value="2" />
		<Setter Property="Padding"
				  Value="2" />
		<Setter Property="AllowDrop"
				  Value="true" />
		<Setter Property="FocusVisualStyle"
				  Value="{x:Null}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TextBox}">
					<Border x:Name="Bd"
							  SnapsToDevicePixels="true"
							  Background="{TemplateBinding Background}"
							  BorderThickness="{TemplateBinding BorderThickness}"
							  BorderBrush="{TemplateBinding BorderBrush}">
						<ScrollViewer x:Name="PART_ContentHost"
										  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled"
									Value="false">
							<Setter Property="Background"
									  TargetName="Bd"
									  Value="{StaticResource INFBackgroundDisabledGradient}" />
							<Setter Property="Foreground"
									  Value="{StaticResource INFForegroundDisabledColor}" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>